﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace devtm.Documentation.CSharpModel
{

    public abstract class ItemsSourceCache : IItemsSourceCache
    {
        // Fields
        private Dictionary<string, IItemsSource> cache = new Dictionary<string, IItemsSource>();

        // Methods
        protected ItemsSourceCache()
        {
        }

        void IItemsSourceCache.SetItemsSource(string relationshipIdentity, IItemsSource source)
        {
            this.cache[relationshipIdentity] = source;
        }

        bool IItemsSourceCache.TryGetItemsSource(string relationshipIdentity, out IItemsSource source)
        {
            return this.cache.TryGetValue(relationshipIdentity, out source);
        }
    }



}
